#{extends 'main.html' /}
#{set title:'发现故事' /}
#{set 'moreScripts'}
	#{script 'story.js' /}
#{/set}
#{set 'moreStyles'}
     #{stylesheet 'story.css' /}
#{/set}
<script>
	var addToFavoriteURL = #{jsAction @stories.addToFavorite(':storyId') /}
	var removeFavoriteURL = #{jsAction @stories.removeFavorite(':storyId') /}
</script>

<div class="content_body_970">
	<div class="recommend_toolbar">
		<a href="@{users.recommend()}">发现用户</a>
		<a href="@{stories.recommend()}">发现故事</a>
	</div>
	#{list stories , as: 's'}
		<div>
			${s.title}
			<button class="addToFavoriteBtn" onclick="addToFavorite(${s.id})">关注</button>
			<button class="removeFavoriteBtn" onclick="removeFavorite(${s.id})">取消关注</button>
		</div>
	#{/list}
</div>